Until commit
506b75fc7f3 we got away with not handling a NULL return
value, as cairo_surface_destroy() deals with a NULL surface; the same
isn't true for get_width/get_height, so guard to code in question to
prevent a crash.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1678
* @window_actor: a #MetaWindowActor
* @window_rect: a #MetaRectangle
*
- * Returns: (transfer full): a new #ClutterContent
+ * Returns: (transfer full) (nullable): a new #ClutterContent
*/
ClutterContent *
shell_util_get_content_for_window_actor (MetaWindowActor *window_actor,
surface = meta_window_actor_get_image (window_actor, &clip);
+ if (!surface)
+ return NULL;
+
content = clutter_canvas_new ();
clutter_canvas_set_size (CLUTTER_CANVAS (content),
cairo_image_surface_get_width (surface),